Optimal. Leaf size=99 \[ -4 a b \left (a^2-b^2\right ) x-\frac {3 a^3 b \cot (c+d x)}{d}-\frac {b^4 \log (\cos (c+d x))}{d}-\frac {a^2 \left (a^2-6 b^2\right ) \log (\sin (c+d x))}{d}-\frac {a^2 \cot ^2(c+d x) (a+b \tan (c+d x))^2}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3646, 3716,
3705, 3556} \begin {gather*} -\frac {3 a^3 b \cot (c+d x)}{d}-\frac {a^2 \left (a^2-6 b^2\right ) \log (\sin (c+d x))}{d}-4 a b x \left (a^2-b^2\right )-\frac {a^2 \cot ^2(c+d x) (a+b \tan (c+d x))^2}{2 d}-\frac {b^4 \log (\cos (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3556
Rule 3646
Rule 3705
Rule 3716
Rubi steps
\begin {align*} \int \cot ^3(c+d x) (a+b \tan (c+d x))^4 \, dx &=-\frac {a^2 \cot ^2(c+d x) (a+b \tan (c+d x))^2}{2 d}+\frac {1}{2} \int \cot ^2(c+d x) (a+b \tan (c+d x)) \left (6 a^2 b-2 a \left (a^2-3 b^2\right ) \tan (c+d x)+2 b^3 \tan ^2(c+d x)\right ) \, dx\\ &=-\frac {3 a^3 b \cot (c+d x)}{d}-\frac {a^2 \cot ^2(c+d x) (a+b \tan (c+d x))^2}{2 d}+\frac {1}{2} \int \cot (c+d x) \left (-2 a^2 \left (a^2-6 b^2\right )-8 a b \left (a^2-b^2\right ) \tan (c+d x)+2 b^4 \tan ^2(c+d x)\right ) \, dx\\ &=-4 a b \left (a^2-b^2\right ) x-\frac {3 a^3 b \cot (c+d x)}{d}-\frac {a^2 \cot ^2(c+d x) (a+b \tan (c+d x))^2}{2 d}+b^4 \int \tan (c+d x) \, dx-\left (a^2 \left (a^2-6 b^2\right )\right ) \int \cot (c+d x) \, dx\\ &=-4 a b \left (a^2-b^2\right ) x-\frac {3 a^3 b \cot (c+d x)}{d}-\frac {b^4 \log (\cos (c+d x))}{d}-\frac {a^2 \left (a^2-6 b^2\right ) \log (\sin (c+d x))}{d}-\frac {a^2 \cot ^2(c+d x) (a+b \tan (c+d x))^2}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.32, size = 90, normalized size = 0.91 \begin {gather*} -\frac {8 a^3 b \cot (c+d x)+a^4 \cot ^2(c+d x)-(a-i b)^4 \log (i-\cot (c+d x))-(a+i b)^4 \log (i+\cot (c+d x))-2 b^4 \log (\tan (c+d x))}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.21, size = 90, normalized size = 0.91
method | result | size |
derivativedivides | \(\frac {a^{4} \left (-\frac {\left (\cot ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )+4 a^{3} b \left (-\cot \left (d x +c \right )-d x -c \right )+6 a^{2} b^{2} \ln \left (\sin \left (d x +c \right )\right )+4 a \,b^{3} \left (d x +c \right )-b^{4} \ln \left (\cos \left (d x +c \right )\right )}{d}\) | \(90\) |
default | \(\frac {a^{4} \left (-\frac {\left (\cot ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )+4 a^{3} b \left (-\cot \left (d x +c \right )-d x -c \right )+6 a^{2} b^{2} \ln \left (\sin \left (d x +c \right )\right )+4 a \,b^{3} \left (d x +c \right )-b^{4} \ln \left (\cos \left (d x +c \right )\right )}{d}\) | \(90\) |
norman | \(\frac {\left (-4 a^{3} b +4 a \,b^{3}\right ) x \left (\tan ^{2}\left (d x +c \right )\right )-\frac {a^{4}}{2 d}-\frac {4 a^{3} b \tan \left (d x +c \right )}{d}}{\tan \left (d x +c \right )^{2}}+\frac {\left (a^{4}-6 a^{2} b^{2}+b^{4}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d}-\frac {a^{2} \left (a^{2}-6 b^{2}\right ) \ln \left (\tan \left (d x +c \right )\right )}{d}\) | \(113\) |
risch | \(-4 a^{3} b x +4 a \,b^{3} x +i a^{4} x -6 i a^{2} b^{2} x +i b^{4} x +\frac {2 i a^{4} c}{d}-\frac {12 i a^{2} b^{2} c}{d}+\frac {2 i b^{4} c}{d}+\frac {2 a^{3} \left (a \,{\mathrm e}^{2 i \left (d x +c \right )}-4 i b \,{\mathrm e}^{2 i \left (d x +c \right )}+4 i b \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}-\frac {a^{4} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}+\frac {6 a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) b^{2}}{d}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) b^{4}}{d}\) | \(186\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 99, normalized size = 1.00 \begin {gather*} -\frac {8 \, {\left (a^{3} b - a b^{3}\right )} {\left (d x + c\right )} - {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 2 \, {\left (a^{4} - 6 \, a^{2} b^{2}\right )} \log \left (\tan \left (d x + c\right )\right ) + \frac {8 \, a^{3} b \tan \left (d x + c\right ) + a^{4}}{\tan \left (d x + c\right )^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.60, size = 126, normalized size = 1.27 \begin {gather*} -\frac {b^{4} \log \left (\frac {1}{\tan \left (d x + c\right )^{2} + 1}\right ) \tan \left (d x + c\right )^{2} + 8 \, a^{3} b \tan \left (d x + c\right ) + a^{4} + {\left (a^{4} - 6 \, a^{2} b^{2}\right )} \log \left (\frac {\tan \left (d x + c\right )^{2}}{\tan \left (d x + c\right )^{2} + 1}\right ) \tan \left (d x + c\right )^{2} + {\left (a^{4} + 8 \, {\left (a^{3} b - a b^{3}\right )} d x\right )} \tan \left (d x + c\right )^{2}}{2 \, d \tan \left (d x + c\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 1.36, size = 170, normalized size = 1.72 \begin {gather*} \begin {cases} \tilde {\infty } a^{4} x & \text {for}\: \left (c = 0 \vee c = - d x\right ) \wedge \left (c = - d x \vee d = 0\right ) \\x \left (a + b \tan {\left (c \right )}\right )^{4} \cot ^{3}{\left (c \right )} & \text {for}\: d = 0 \\\frac {a^{4} \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} - \frac {a^{4} \log {\left (\tan {\left (c + d x \right )} \right )}}{d} - \frac {a^{4}}{2 d \tan ^{2}{\left (c + d x \right )}} - 4 a^{3} b x - \frac {4 a^{3} b}{d \tan {\left (c + d x \right )}} - \frac {3 a^{2} b^{2} \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{d} + \frac {6 a^{2} b^{2} \log {\left (\tan {\left (c + d x \right )} \right )}}{d} + 4 a b^{3} x + \frac {b^{4} \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.85, size = 132, normalized size = 1.33 \begin {gather*} -\frac {8 \, {\left (a^{3} b - a b^{3}\right )} {\left (d x + c\right )} - {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 2 \, {\left (a^{4} - 6 \, a^{2} b^{2}\right )} \log \left ({\left | \tan \left (d x + c\right ) \right |}\right ) - \frac {3 \, a^{4} \tan \left (d x + c\right )^{2} - 18 \, a^{2} b^{2} \tan \left (d x + c\right )^{2} - 8 \, a^{3} b \tan \left (d x + c\right ) - a^{4}}{\tan \left (d x + c\right )^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.01, size = 102, normalized size = 1.03 \begin {gather*} -\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )\,\left (a^4-6\,a^2\,b^2\right )}{d}+\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,{\left (a+b\,1{}\mathrm {i}\right )}^4}{2\,d}+\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,{\left (b+a\,1{}\mathrm {i}\right )}^4}{2\,d}-\frac {{\mathrm {cot}\left (c+d\,x\right )}^2\,\left (\frac {a^4}{2}+4\,b\,\mathrm {tan}\left (c+d\,x\right )\,a^3\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________